Ext.define('AmpleHarvest.objects.harvestrequest.view.window.request.Window',
{
   extend         : 'Ext.window.Window',
   requires    :
   [
      "AmpleHarvest.objects.harvestrequest.view.window.request.Form"
   ],
   layout         : 'fit',
   y           : 0,
   m_bool_Editable   : false,
   
   minimizable    : false,
   maximizable    : false,
   closable    : false,
   iconCls        : "harvestRequest",
   width       : 600,
   height      : Ext.getBody().getViewSize().height * 3/4,
   shim        : false,
   animCollapse   : false,
   title       : "Harvest Request",
   modal       : true,
   tools       :
   [
         {
            type  : "help",
            handler  : function()
            {
               Ext.Msg.show(
               {
                  title : "Harvest Request Help",
                  iconCls  : "help",
                  width : 600,
                  buttons  : Ext.Msg.OK,
                  msg      : "<b>User</b> - This is the users SID<br/>"
                        + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - REQUIRED<br/>"
                        + "<b>Source URL</b> - This is the URL of the site you wish to be harvested.<br/>"
                        + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - REQUIRED<br/>"
                        + "<b>Language</b> - This is the Language you expect the site to be in.<br/>"
                        + "<b>Description</b> - This is a description of the site and what you are looking for.<br/>"
                        + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - REQUIRED<br/>"
                        + "<b>Keywords</b> -  This is a list of Keywords you would like searched for on the site.<br/>"
                        + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - REQUIRED If Whole site is not selected<br/>"
                        + "<b>Whole Site</b> -  Select this option if you would like the entire site harvested.<br/>"
                        + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - REQUIRED If Keywords are not selected<br/>"
                        + "<b>Harvest Reason</b> -  This is the reason that you need the site to be harvested.<br/>"
                        + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - REQUIRED<br/>"
                        + "<b>Comments</b> -  Any comments or special instructions you have for the harvest manager.<br/>"
                        + "<b>Sensitive</b> -  Are there any risks associated with the harvesting of this site.<br/>"
                        + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - REQUIRED<br/>"
                        + "<b>Risk</b> -  What is the risk associated with harvesting this site.<br/>"
                        + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - REQUIRED if Sensitive is set to Yes<br/>"
                        + "<b>Source Type</b> - What type of site are you trying to harvest.<br/>"
                        + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - REQUIRED<br/>"
                        + "<b>Frequency</b> - How often would you like the site harvested for new content.<br/>"
                        + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - REQUIRED<br/>",
                  icon  : Ext.MessageBox.QUESTION
               }
               );
            }
         }
   ],

   initComponent  : function()
   {
      this.m_str_UserName = obj_config.user.userName;//"<?php print($obj_UserValidation->get_UserName()) ?>";
      this.m_obj_Form = Ext.create(
            "AmpleHarvest.objects.harvestrequest.view.window.request.Form",
            {
            	autoScroll  : true,
               m_bool_Editable   : this.m_bool_Editable
            }
      );
      this.callParent();

      this.add(this.m_obj_Form);
      
      this.defaultFocus = this.m_obj_Form.m_obj_Classification;

   },

   set_RequestID  : function(str_ID)
   {
      this.m_obj_Form.set_RequestID(str_ID);
   }
}
);